home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 97 / CD-ROM 97 / CD-ROM 97.iso / jogos / spherical / Code / Game / draw.cpp next >
Encoding:
C/C++ Source or Header  |  2002-08-14  |  16.5 KB  |  557 lines

  1.  
  2. // Copyright (C) 2002 by Luigi Pino.  All Rights Reserved.
  3.  
  4. /***************************************************************************/
  5.  
  6. #include "../library/neurosis.h"
  7. #include "draw.h"
  8. #include "file_io.h"
  9. #include "hiscore.h"
  10. #include "initialize.h"
  11. #include "main.h"
  12. #include "menu_misc.h"
  13. #include "paddle.h"
  14. #include "sphere.h"
  15. #include "update.h"
  16.  
  17. /***************************************************************************/
  18.  
  19. float                                                    ending_rotate = 0.0f;
  20. float                                                    ending_rotate_sign = 1.0f;
  21.  
  22. extern Camera_Class                        camera;
  23. extern Light_Values_Struct        light_values;
  24. extern Main_Menu_Class                menu;
  25. extern Object3_Class                    ground_cover;
  26. extern Object3_Class                    paddle[];
  27. extern Object3_Class                    sphere[];
  28. extern Object4_Class                    ground;
  29. extern Object4_Class                    wall_net;
  30. extern Object4_Class                    wall_side;
  31. extern Paddle_Struct                    paddle_object[];
  32. extern Shadow_Box_Struct            light_source;
  33. extern Sphere_Control_Struct    sphere_object[];
  34. extern Sub_Menu_Class                    game_scores;
  35. extern Timing_Class                        timing;
  36. extern Values_Struct                    values;
  37. extern Window_Class                        window;
  38.  
  39. extern int                                        goal_by_team;
  40.  
  41. /***************************************************************************/
  42.  
  43. void Draw_Arrow(int current_sphere, float size)
  44.  
  45. {
  46.     glEnable(GL_BLEND);
  47.     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  48.     glColor4f(values.fade_amount, values.fade_amount, values.fade_amount, sphere_object[current_sphere].seconds_left / 3.0f);
  49.     glBindTexture(GL_TEXTURE_2D, window.Get_Texture(t_arrow));
  50.  
  51.     float3 sphere_base = sphere[current_sphere].Get_Base();
  52.     glTranslatef(sphere_base.x, sphere_base.y, 0.0f);
  53.     glRotatef(sphere_object[current_sphere].movement.direction, 0.0f, 0.0f, 1.0f);
  54.  
  55.     glBegin(GL_POLYGON);
  56.         glTexCoord2f(0.5725f, 0.1882f);
  57.         glVertex3f(18.0f * size, 43.0f * size, 0.1f);
  58.         glTexCoord2f(0.3020f, 0.1490f);
  59.         glVertex3f(-51.0f * size, 33.0f * size, 0.1f);
  60.         glTexCoord2f(0.4392f, 0.5176f);
  61.         glVertex3f(-16.0f * size, 127.0f * size, 0.1f);
  62.         glTexCoord2f(0.6157f, 0.3843f);
  63.         glVertex3f(29.0f * size, 125.0f * size, 0.1f);
  64.         glTexCoord2f(0.6706f, 0.1843f);
  65.         glVertex3f(43.0f * size, 42.0f * size, 0.1f);
  66.     glEnd();
  67.  
  68.     glBegin(GL_POLYGON);
  69.         glTexCoord2f(0.2196f, 0.5137f);
  70.         glVertex3f(-72.0f * size, 126.0f * size, 0.1f);
  71.         glTexCoord2f(0.4863f, 0.8275f);
  72.         glVertex3f(-4.0f * size, 206.0f * size, 0.1f);
  73.         glTexCoord2f(0.8667f, 0.5098f);
  74.         glVertex3f(93.0f * size, 125.0f * size, 0.1f);
  75.         glTexCoord2f(0.6157f, 0.5098f);
  76.         glVertex3f(29.0f * size, 125.0f * size, 0.1f);
  77.         glTexCoord2f(0.4392f, 0.5176f);
  78.         glVertex3f(-16.0f * size, 127.0f * size, 0.1f);
  79.     glEnd();
  80.  
  81.     glRotatef(-sphere_object[current_sphere].movement.direction, 0.0f, 0.0f, 1.0f);
  82.     glTranslatef(-sphere_base.x, -sphere_base.y, 0.0f);
  83.     glDisable(GL_BLEND);
  84. }
  85.  
  86. /***************************************************************************/
  87.  
  88. void Draw_Items()
  89.  
  90. {
  91.     float3    light_base = {0.0f, 0.0f, 0.0f};
  92.     int            x1;
  93.  
  94.     #ifdef _DEBUG
  95.         if (window.keys[VK_SUBTRACT])
  96.             {
  97.                 glPolygonMode(GL_FRONT, GL_LINE);
  98.                 glPolygonMode(GL_BACK, GL_LINE);
  99.             }
  100.         else
  101.             {
  102.                 glPolygonMode(GL_FRONT, GL_FILL);
  103.                 glPolygonMode(GL_BACK, GL_FILL);
  104.             }
  105.     #endif
  106.  
  107.     if (values.game_start_fade == true)
  108.         {
  109.             values.fade_amount = values.fade_amount + (0.5f * timing.Get_Scale());
  110.  
  111.             if (values.fade_amount >= 1.0f)
  112.                 {
  113.                     values.game_start_fade = false;
  114.                     values.fade_amount = 1.0f;
  115.                 }
  116.         }
  117.     else if (values.game_end_fade == true)
  118.         {
  119.             values.fade_amount = values.fade_amount - (0.5f * timing.Get_Scale());
  120.  
  121.             if (values.fade_amount <= 0.0f)
  122.                 {
  123.                     values.game_end_fade = false;
  124.                     values.fade_amount = 0.0f;
  125.                     menu.Set_Current(&game_scores);
  126.                     values.game_position = Game_Menu;
  127.                 }
  128.         }
  129.  
  130.     glLoadIdentity();
  131.     glTranslatef(0.0f, 0.0f, camera.zoom_current);
  132.     glRotatef(camera.axis_current.x, 1.0f, 0.0f, 0.0f);
  133.     glRotatef(camera.axis_current.z, 0.0f, 0.0f, 1.0f);
  134.  
  135.     // Draw ground cover
  136.     ground_cover.Color();
  137.  
  138.     // Draw ground
  139.     ground.Initialize_Light();
  140.     ground.Calculate_Light(&light_source);
  141.     ground.Finalize_Light();
  142.     ground.Fade(values.fade_amount);
  143.     ground.Draw();
  144.  
  145.     // Draw arrows
  146.     for (x1=0;x1<values.sphere_number;x1=x1+1)
  147.         {
  148.             if (sphere_object[x1].goal == true)
  149.                 {
  150.                     if (values.sphere_number == 1)
  151.                         Draw_Arrow(x1, 0.3333f);
  152.                     else
  153.                         Draw_Arrow(x1, 0.1833f);
  154.                 }
  155.         }
  156.  
  157.     if (values.game_type == Timed)
  158.         Update_Current_Light_Point();
  159.  
  160.     // Initialize light source
  161.     light_source.position.x = light_values.distance_current;
  162.     light_source.position.y = 0.0f;
  163.     Rotate_z(&light_base, &light_source.position, light_values.rotate_current);
  164.  
  165.     // Draw spheres
  166.     for (x1=0;x1<values.sphere_number;x1=x1+1)
  167.         {
  168.             sphere[x1].Initialize_Light();
  169.             sphere[x1].Calculate_Light(&light_source);
  170.             sphere[x1].Finalize_Light();
  171.             sphere[x1].Fade(values.fade_amount);
  172.             sphere[x1].Rotate_z(-sphere_object[x1].movement.direction);
  173.             sphere[x1].Rotate_y(-sphere_object[x1].movement.speed / 25.0f);
  174.             sphere[x1].Rotate_z(sphere_object[x1].movement.direction);
  175.             sphere[x1].Draw();
  176.         }
  177.  
  178.     // Draw paddles
  179.     for (x1=Up;x1<=Right;x1=x1+1)
  180.         if (paddle_object[x1].game_over == false)
  181.             {
  182.                 paddle[x1].Initialize_Light();
  183.                 paddle[x1].Calculate_Light(&light_source);
  184.                 paddle[x1].Finalize_Light();
  185.                 paddle[x1].Fade(values.fade_amount);
  186.                 paddle[x1].Draw();
  187.  
  188.                 // Make sure time doesn't count during fadeout
  189.                 if ((values.seconds_left >= 0.0f) || (values.game_type == Countdown))
  190.                     paddle_object[x1].time_lapse = paddle_object[x1].time_lapse + timing.Get_Scale();
  191.  
  192.                 if ((values.game_type == Countdown) && (goal_by_team == x1))
  193.                     paddle_object[x1].score = paddle_object[x1].score - (3.0f * timing.Get_Scale());
  194.             }
  195.  
  196.     // Draw Wall
  197.     if (camera.axis_current.x < 300.0f)
  198.         {
  199.             for (x1=0;x1<wall_net.Get_Size();x1=x1+1)
  200.                 wall_net.Set_Alpha(x1, 1.0f - ((300.0f - camera.axis_current.x) * 0.02f));
  201.             for (x1=0;x1<wall_side.Get_Size();x1=x1+1)
  202.                 wall_side.Set_Alpha(x1, 1.0f - ((300.0f - camera.axis_current.x) * 0.02f));
  203.         }
  204.  
  205.     wall_net.Initialize_Light();
  206.     wall_net.Calculate_Light(&light_source);
  207.     wall_net.Finalize_Light();
  208.     wall_net.Fade(values.fade_amount);
  209.     wall_net.Draw();
  210.     wall_side.Initialize_Light();
  211.     wall_side.Calculate_Light(&light_source);
  212.     wall_side.Finalize_Light();
  213.     wall_side.Fade(values.fade_amount);
  214.     wall_side.Draw();
  215.  
  216.     // Draw score behind paddles
  217.     for (x1=Up;x1<=Right;x1=x1+1)
  218.         {
  219.             if (paddle_object[x1].game_over == false)
  220.                 {
  221.                     if (x1 == Up)
  222.                         {
  223.                             Draw_Score(Up, true);
  224.                             Draw_Score(Up, false);
  225.                         }
  226.                     else if (x1 == Down)
  227.                         {
  228.                             Draw_Score(Down, true);
  229.                             Draw_Score(Down, false);
  230.                         }
  231.                     else if (x1 == Left)
  232.                         {
  233.                             Draw_Score(Left, true);
  234.                             Draw_Score(Left, false);
  235.                         }
  236.                     else if (x1 == Right)
  237.                         {
  238.                             Draw_Score(Right, true);
  239.                             Draw_Score(Right, false);
  240.                         }
  241.                 }
  242.         }
  243.  
  244.     #ifdef _DEBUG
  245.         window.Font_Begin();
  246.         window.Font_Int((int)(1.0f / timing.Get_Scale()), 290.0f, -220.0f, 10.0f, R_4, G_4, B_4);
  247.         window.Font_Int(window.polygon_number, -310, -220.0f, 10.0f, R_4, G_4, B_4);
  248.         window.polygon_number = 0;
  249.         window.Font_End();
  250.     #endif
  251. }
  252.  
  253. /***************************************************************************/
  254.  
  255. void Draw_Score(int net, bool front)
  256.  
  257. {
  258.     char    temp;
  259.     char    word[20];
  260.     float    counter = 0.0f;
  261.     float    size = 33.0f;
  262.     float    x = 0.0f;
  263.     float    y = 0.0f;
  264.     float    x_percent;
  265.     float    y_percent;
  266.     float    x_left = 0.0f;
  267.     float    x_right = 0.0f;
  268.     float    y_left = 0.0f;
  269.     float    y_right = 0.0f;
  270.     float    z_top = 0.0f;
  271.     float    z_bottom = 0.0f;
  272.     int        length;
  273.  
  274.     _itoa((int)(paddle_object[net].score), word, 10);
  275.     length = strlen(word);
  276.  
  277.     if (((front == false) && (net == Up)) || ((front == true) && (net == Down)) || ((front == false) && (net == Left)) ||
  278.             ((front == true) && (net == Right)))
  279.             
  280.             {
  281.                 for (int x1=0;x1<length/2;x1=x1+1)
  282.                     {
  283.                         temp = word[length - 1 - x1];
  284.                         word[length - 1 - x1] = word[x1];
  285.                         word[x1] = temp;
  286.                     }
  287.             }
  288.  
  289.     if (net == Up)
  290.         {
  291.             x = 0.0f - (length * 17.0f);
  292.             y_left = 0.0f;
  293.             y_right = 0.0f;
  294.             z_top = 33.0f;
  295.             z_bottom = 0.0f;
  296.  
  297.             if (front == true)
  298.                 y = 189.0f;
  299.             else
  300.                 y = 191.0f;
  301.         }
  302.     else if (net == Down)
  303.         {
  304.             x = 0.0f - (length * 17.0f);
  305.             y_left = 0.0f;
  306.             y_right = 0.0f;
  307.             z_top = 33.0f;
  308.             z_bottom = 0.0f;
  309.  
  310.             if (front == true)
  311.                 y = -189.0f;
  312.             else
  313.                 y = -191.0f;
  314.         }
  315.     else if (net == Left)
  316.         {
  317.             y = 0.0f - (length * 17.0f);
  318.             x_left = 0.0f;
  319.             x_right = 0.0f;
  320.             z_top = 33.0f;
  321.             z_bottom = 0.0f;
  322.  
  323.             if (front == true)
  324.                 x = -189.0f;
  325.             else
  326.                 x = -191.0f;
  327.         }
  328.     else if (net == Right)
  329.         {
  330.             y = 0.0f - (length * 17.0f);
  331.             x_left = 0.0f;
  332.             x_right = 0.0f;
  333.             z_top = 33.0f;
  334.             z_bottom = 0.0f;
  335.  
  336.             if (front == true)
  337.                 x = 189.0f;
  338.             else
  339.                 x = 191.0f;
  340.         }
  341.             
  342.     glLoadIdentity();
  343.     glTranslatef(0.0f, 0.0f, camera.zoom_current);
  344.     glRotatef(camera.axis_current.x, 1.0f, 0.0f, 0.0f);
  345.     glRotatef(camera.axis_current.z, 0.0f, 0.0f, 1.0f);
  346.     glTranslatef(x, y, 8.0f);
  347.  
  348.     glEnable(GL_BLEND);
  349.  
  350.     while (counter < length)
  351.         {
  352.             if (net == Up)
  353.                 {
  354.                     if (front == true)
  355.                         {
  356.                             x_left = (size * counter) - (2.5f * counter);
  357.                             x_right = (size * (1.0f + counter)) - (2.5f * counter);
  358.                         }
  359.                     else
  360.                         {
  361.                             x_left = (size * (1.0f + counter)) - (2.5f * counter);
  362.                             x_right = (size * counter) - (2.5f * counter);
  363.                         }
  364.                 }
  365.             else if (net == Down)
  366.                 {
  367.                     if (front == true)
  368.                         {
  369.                             x_left = (size * (1.0f + counter)) - (2.5f * counter);
  370.                             x_right = (size * counter) - (2.5f * counter);
  371.                         }
  372.                     else
  373.                         {
  374.                             x_left = (size * counter) - (2.5f * counter);
  375.                             x_right = (size * (1.0f + counter)) - (2.5f * counter);
  376.                         }
  377.                 }
  378.             else if (net == Left)
  379.                 {
  380.                     if (front == true)
  381.                         {
  382.                             y_left = (size * counter) - (2.5f * counter);
  383.                             y_right = (size * (1.0f + counter)) - (2.5f * counter);
  384.                         }
  385.                     else
  386.                         {
  387.                             y_left = (size * (1.0f + counter)) - (2.5f * counter);
  388.                             y_right = (size * counter) - (2.5f * counter);
  389.                         }
  390.                 }
  391.             else if (net == Right)
  392.                 {
  393.                     if (front == true)
  394.                         {
  395.                             y_left = (size * (1.0f + counter)) - (2.5f * counter);
  396.                             y_right = (size * counter) - (2.5f * counter);
  397.                         }
  398.                     else
  399.                         {
  400.                             y_left = (size * counter) - (2.5f * counter);
  401.                             y_right = (size * (1.0f + counter)) - (2.5f * counter);
  402.                         }
  403.                 }
  404.  
  405.             x_percent = 0.5f;
  406.             y_percent = 0.5f;
  407.  
  408.             switch (word[(int)(counter)])
  409.                 {
  410.                     case 48    :    x_percent = 0.250f;        y_percent = 0.625f;        break;    // 0
  411.                     case 49    :    x_percent = 0.375f;        y_percent = 0.625f;        break;    // 1
  412.                     case 50    :    x_percent = 0.500f;        y_percent = 0.625f;        break;    // 2
  413.                     case 51    :    x_percent = 0.625f;        y_percent = 0.625f;        break;    // 3
  414.                     case 52    :    x_percent = 0.750f;        y_percent = 0.625f;        break;    // 4
  415.                     case 53    :    x_percent = 0.875f;        y_percent = 0.625f;        break;    // 5
  416.                     case 54    :    x_percent = 0.000f;        y_percent = 0.500f;        break;    // 6
  417.                     case 55    :    x_percent = 0.125f;        y_percent = 0.500f;        break;    // 7
  418.                     case 56    :    x_percent = 0.250f;        y_percent = 0.500f;        break;    // 8
  419.                     case 57    :    x_percent = 0.375f;        y_percent = 0.500f;        break;    // 9
  420.                 }
  421.  
  422.             glBlendFunc(GL_DST_COLOR, GL_ZERO);
  423.  
  424.             glBindTexture(GL_TEXTURE_2D, window.Get_Texture(t_font_mask));
  425.             glColor3f(1.0f, 1.0f, 1.0f);
  426.  
  427.             glBegin(GL_QUADS);
  428.                 glTexCoord2f(x_percent, y_percent);
  429.                 glVertex3f(x_left, y_left, z_top);
  430.                 glTexCoord2f(x_percent + 0.125f, y_percent);
  431.                 glVertex3f(x_right, y_right, z_top);
  432.                 glTexCoord2f(x_percent + 0.125f, y_percent - 0.125f);
  433.                 glVertex3f(x_right, y_right, z_bottom);
  434.                 glTexCoord2f(x_percent, y_percent - 0.125f);
  435.                 glVertex3f(x_left, y_left, z_bottom);
  436.             glEnd();
  437.  
  438.             glBlendFunc(GL_ONE, GL_ONE);
  439.  
  440.             glBindTexture(GL_TEXTURE_2D, window.Get_Texture(t_font));
  441.             glColor3f(0.0f * values.fade_amount, 0.8863f * values.fade_amount, 0.1255f * values.fade_amount);
  442.  
  443.             glBegin(GL_QUADS);
  444.                 glTexCoord2f(x_percent, y_percent);
  445.                 glVertex3f(x_left, y_left, z_top);
  446.                 glTexCoord2f(x_percent + 0.125f, y_percent);
  447.                 glVertex3f(x_right, y_right, z_top);
  448.                 glTexCoord2f(x_percent + 0.125f, y_percent - 0.125f);
  449.                 glVertex3f(x_right, y_right, z_bottom);
  450.                 glTexCoord2f(x_percent, y_percent - 0.125f);
  451.                 glVertex3f(x_left, y_left, z_bottom);
  452.             glEnd();
  453.  
  454.             counter = counter + 1.0f;
  455.         }
  456.  
  457.     glDisable(GL_BLEND);
  458. }
  459.  
  460. /***************************************************************************/
  461.  
  462. void Ending()
  463.  
  464. {
  465.     float3    image_base = {-270.0f, -200.0f, 0.0f};
  466.     float3    point_up_left = {-320.0f, 200.0f, 0.0f};
  467.     float3    point_up_right = {200.0f, 200.0f, 0.0f};
  468.     float3    point_down_right = {200.0f, -240.0f, 0.0f};
  469.     float3    point_down_left = {-320.0f, -240.0f, 0.0f};
  470.  
  471.     if (values.fade_amount < 1.0f)
  472.         values.fade_amount = values.fade_amount + (0.4f * timing.Get_Scale());
  473.     else
  474.         values.fade_amount = 1.0f;
  475.  
  476.     Quad_Color(-320.0f, 240.0f, 0.0f, 320.0f, 240.0f, 0.0f, 320.0f, -245.0f, 0.0f, -320.0f, -245.0f, 0.0f,
  477.         (165.0f / 255.0f) * values.fade_amount, (165.0f / 255.0f) * values.fade_amount, (165.0f / 255.0f) * values.fade_amount, 1.0f);
  478.  
  479.     if ((window.keys[VK_ESCAPE]) || (window.keys[VK_RETURN]))
  480.         window.quit_game = true;
  481.  
  482.     Rotate_z(&image_base, &point_up_left, ending_rotate);
  483.     Rotate_z(&image_base, &point_up_right, ending_rotate);
  484.     Rotate_z(&image_base, &point_down_right, ending_rotate);
  485.     Rotate_z(&image_base, &point_down_left, ending_rotate);
  486.  
  487.     ending_rotate = ending_rotate + (ending_rotate_sign * 30.0f * timing.Get_Scale());
  488.  
  489.     if (ending_rotate > 20.0f)
  490.         ending_rotate_sign = -1.0f;
  491.     else if (ending_rotate < -10.0f)
  492.         ending_rotate_sign = 1.0f;
  493.  
  494.     Quad_Texture(t_menu_1, point_up_left.x, point_up_left.y, 0.0f, point_up_right.x, point_up_right.y, 0.0f,
  495.         point_down_right.x, point_down_right.y, 0.0f, point_down_left.x, point_down_left.y, 0.0f,
  496.         0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, values.fade_amount, values.fade_amount, values.fade_amount);
  497.     Quad_Texture(t_menu_2, 50.0f, 80.0f, 0.0f, 300.0f, 80.0f, 0.0f, 300.0f, -170.0f, 0.0f, 50.0f, -170.0f, 0.0f,
  498.         0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, values.fade_amount, values.fade_amount, values.fade_amount);
  499.  
  500.     window.Font_Char("SPHERICAL VENGEANCE", -280.0f, 180.0f, 30.0f, R_9, G_9, B_9);
  501.     window.Font_Char("THE 23RD DIMENSION - LP23.COM", -140.0f, 140.0f, 15.0f, R_4, G_4, B_4);
  502.     window.Font_Char("E-MAIL:", -50.0f, -140.0f, 20.0f, R_5, G_5, B_5);
  503.     window.Font_Char("MAIL@LP23.COM", -50.0f, -170.0f, 15.0f, R_5, G_5, B_5);
  504. }
  505.  
  506. /***************************************************************************/
  507.  
  508. void Intro()
  509.  
  510. {
  511.     Quad_Color(-320.0f, 240.0f, 0.0f, 320.0f, 240.0f, 0.0f, 320.0f, -240.0f, 0.0f, -320.0f, -240.0f, 0.0f,
  512.         values.fade_amount, values.fade_amount, values.fade_amount, 1.0f);
  513.  
  514.     if (values.intro_count < 30.0f)
  515.         {
  516.             Quad_Texture(t_menu_1, -150.0f, 150.0f, 0.0f, 150.0f, 150.0f, 0.0f, 150.0f, -150.0f, 0.0f, -150.0f, -150.0f, 0.0f,
  517.                 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, values.fade_amount, values.fade_amount, values.fade_amount);
  518.  
  519.             if (values.fade_amount < 1.0f)
  520.                 values.fade_amount = values.fade_amount + (0.4f * timing.Get_Scale());
  521.             else
  522.                 values.fade_amount = 1.0f;
  523.         }
  524.     else if (values.intro_count < 60.0f)
  525.         {
  526.             Quad_Texture(t_menu_2, -150.0f, 150.0f, 0.0f, 150.0f, 150.0f, 0.0f, 150.0f, -150.0f, 0.0f, -150.0f, -150.0f, 0.0f,
  527.                 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
  528.         }
  529.     else if (values.intro_count < 88.0f)
  530.         {
  531.             Quad_Texture(t_menu_3, -150.0f, 150.0f, 0.0f, 150.0f, 150.0f, 0.0f, 150.0f, -150.0f, 0.0f, -150.0f, -150.0f, 0.0f,
  532.                 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, values.fade_amount, values.fade_amount, values.fade_amount);
  533.  
  534.             values.fade_amount = values.fade_amount - (0.4f * timing.Get_Scale());
  535.         }
  536.     else
  537.         {
  538.             values.fade_amount = 0.0f;
  539.             values.game_position = Game_Menu;
  540.             window.Load_Texture(t_menu_1, "Data/menu_1.bmp");
  541.             window.Load_Texture(t_menu_2, "Data/menu_2.bmp");
  542.         }
  543.  
  544.     if ((window.keys[VK_ESCAPE]) || (window.keys[VK_RETURN]))
  545.         {
  546.             values.fade_amount = 0.0f;
  547.             values.game_position = Game_Menu;
  548.             window.Load_Texture(t_menu_1, "Data/menu_1.bmp");
  549.             window.Load_Texture(t_menu_2, "Data/menu_2.bmp");
  550.             window.keys[VK_ESCAPE] = false;
  551.             window.keys[VK_RETURN] = false;
  552.         }
  553.  
  554.     values.intro_count = values.intro_count + (10.0f * timing.Get_Scale());
  555. }
  556.  
  557. /***************************************************************************/